<html>
<body>
Reports conditional expressions whose conditions are negated.
Flipping the order of the conditional expression branches will usually increase the clarity of such statements.
<!-- tooltip end -->
<p>
  Use the checkboxes below to ignore comparisons of the form <tt>obj != null</tt> or <tt>num != 0</tt>.
  Since <tt>obj != null</tt> effectively means "obj exists",
  the meaning of the whole expression does not involve any negation
  and is therefore easy to understand.
<p>
  The same reasoning applies to <tt>num != 0</tt> expressions, especially when using bit masks.
<p>
  These forms have the added benefit of mentioning the interesting case first.
  In most cases, the value for the <tt>== null</tt> branch is <tt>null</tt> itself,
  like in the following examples:

<pre>
    static String getName(Person p) {
        return p != null ? p.getName() : null;
    }

    static String getExecutableString(int fileMode) {
        return (fileMode & 0xb001001001) != 0 ? "executable" : "non-executable";
    }
</pre>

</body>
</html>